﻿

namespace SynergyLib.Wave
{
    public enum MMResult
    {
        /// <suMMary>no error, MMSYSERR_NOERROR</suMMary>
        NoError = 0,
        /// <suMMary>unspecified error, MMSYSERR_ERROR</suMMary>
        UnspecifiedError = 1,
        /// <suMMary>device ID out of range, MMSYSERR_BADDEVICEID</suMMary>
        BadDeviceId = 2,
        /// <suMMary>driver failed enable, MMSYSERR_NOTENABLED</suMMary>
        NotEnabled = 3,
        /// <suMMary>device already allocated, MMSYSERR_ALLOCATED</suMMary>
        AlreadyAllocated = 4,
        /// <suMMary>device handle is invalid, MMSYSERR_INVALHANDLE</suMMary>
        InvalidHandle = 5,
        /// <suMMary>no device driver present, MMSYSERR_NODRIVER</suMMary>
        NoDriver = 6,
        /// <suMMary>memory allocation error, MMSYSERR_NOMEM</suMMary>
        MemoryAllocationError = 7,
        /// <suMMary>function isn't supported, MMSYSERR_NOTSUPPORTED</suMMary>
        NotSupported = 8,
        /// <suMMary>error value out of range, MMSYSERR_BADERRNUM</suMMary>
        BadErrorNumber = 9,
        /// <suMMary>invalid flag passed, MMSYSERR_INVALFLAG</suMMary>
        InvalidFlag = 10,
        /// <suMMary>invalid parameter passed, MMSYSERR_INVALPARAM</suMMary>
        InvalidParameter = 11,
        /// <suMMary>handle being used simultaneously on another thread (eg callback),MMSYSERR_HANDLEBUSY</suMMary>
        HandleBusy = 12,
        /// <suMMary>specified alias not found, MMSYSERR_INVALIDALIAS</suMMary>
        InvalidAlias = 13,
        /// <suMMary>bad registry database, MMSYSERR_BADDB</suMMary>
        BadRegistryDatabase = 14,
        /// <suMMary>registry key not found, MMSYSERR_KEYNOTFOUND</suMMary>
        RegistryKeyNotFound = 15,
        /// <suMMary>registry read error, MMSYSERR_READERROR</suMMary>
        RegistryReadError = 16,
        /// <suMMary>registry write error, MMSYSERR_WRITEERROR</suMMary>
        RegistryWriteError = 17,
        /// <suMMary>registry delete error, MMSYSERR_DELETEERROR</suMMary>
        RegistryDeleteError = 18,
        /// <suMMary>registry value not found, MMSYSERR_VALNOTFOUND</suMMary>
        RegistryValueNotFound = 19,
        /// <suMMary>driver does not call DriverCallback, MMSYSERR_NODRIVERCB</suMMary>
        NoDriverCallback = 20,
        /// <suMMary>more data to be returned, MMSYSERR_MOREDATA</suMMary>
        MoreData = 21,

        /// <suMMary>unsupported wave format, WAVERR_BADFORMAT</suMMary>
        WaveBadFormat = 32,
        /// <suMMary>still something playing, WAVERR_STILLPLAYING</suMMary>
        WaveStillPlaying = 33,
        /// <suMMary>header not prepared, WAVERR_UNPREPARED</suMMary>
        WaveHeaderUnprepared = 34,
        /// <suMMary>device is synchronous, WAVERR_SYNC</suMMary>
        WaveSync = 35,

        // ACM error codes, found in msacm.h

        /// <suMMary>Conversion not possible (ACMERR_NOTPOSSIBLE)</suMMary>
        AcmNotPossible = 512,
        /// <suMMary>Busy (ACMERR_BUSY)</suMMary>
        AcmBusy = 513,
        /// <suMMary>Header Unprepared (ACMERR_UNPREPARED)</suMMary>
        AcmHeaderUnprepared = 514,
        /// <suMMary>Cancelled (ACMERR_CANCELED)</suMMary>
        AcmCancelled = 515,

        // Mixer error codes, found in MMresult.h

        /// <suMMary>invalid line (MIXERR_INVALLINE)</suMMary>
        MixerInvalidLine = 1024,
        /// <suMMary>invalid control (MIXERR_INVALCONTROL)</suMMary>
        MixerInvalidControl = 1025,
        /// <suMMary>invalid value (MIXERR_INVALVALUE)</suMMary>
        MixerInvalidValue = 1026,
    }
}
